A peer-to-peer (P2P) network may have security flaws through which an attacker may compromise the network. The Sybil attack is a well-known attack on P2P networks. In a Sybil attack, the attacker may introduce a large number of nodes into the P2P network such that many messages passing through the P2P network will pass through at least one of the nodes controlled by the attacker. Because the messages pass through the attacker's nodes, the attacker may drop messages, forge responses, and, in general, take over the P2P network.